package com.company.sendemo.basics.yyPersonalSummary;

import java.util.Arrays;
import java.util.HashMap;

//遍历对象获取指定字符 拼接成string 用 , 分隔
//用 , 分隔的string  转换成 数组 或 Map
public class StringToMap {
    public static void main(String[] args) {
        String ids = "23,33,45,12";
        String[] BoxNumber = ids.split(",");
        System.out.println(Arrays.deepToString(BoxNumber));
        java.util.Map mapMM = new HashMap();
        for (int i = 0; i <BoxNumber.length ; i++) {
            System.out.println(BoxNumber[i]);
            mapMM.put("GUID",BoxNumber[i]);
        }
        System.out.println(mapMM);
        String BoxNumbesr = String.valueOf(ids.split(","));
        System.out.println(BoxNumbesr);
    }
}
